﻿using LuckyShell.Commands;
using LuckyShell.ShellValues;

namespace LuckyShell.ShellOrders;

public class CommandOrder(string commandName, List<ShellValue> values) : ShellOrder
{
    public void Run(ref VariateManager manager)
    {
        var result = new StaticCommand().FromNameToCommand(CommandName, Values);
        result.Run(ref manager);
    }

    private string CommandName { get; set; } = commandName;
    private List<ShellValue> Values { get; set; } = values;
}